package com.dys.memoryanalysis;

/**
 * @className: com.dys.memoryanalysis.Person
 * @description: com.dys.memoryanalysis
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/07/14 下午10:04
 */
public class Person {
    int id;
    int age;
    String school;

    public Person() {
    }

    public Person(int a, int b, String c) {
        id = a;
        age = b;
        school = c;
    }

    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 这是一个main()方法,是应用程序的入口
     *
     * @param args 方法的形参列表,是一个字符串数组,包含了从命令行传递给程序的参数
     */
    public static void main(String[] args) {
        Person p = new Person();
        int age = 40;
        Person tom = new Person(1, 20, "清华大学");
        Person jack = new Person(1, 20, "北京大学");
    }

    public void change1(int i) {
        i = 3366;
    }

    public void change2(Person p) {
        p = new Person();
    }

    public void change3(Person p) {
        p.setAge(66);
    }
}
